package com.example.springbootzuoye.service.impl;

import com.example.springbootzuoye.entity.Emp;
import com.example.springbootzuoye.service.EmpService;
import com.example.springbootzuoye.dao.EmpMapper;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * (Emp)表服务实现类
 *
 * @author makejava
 * @since 2022-12-23 00:38:37
 */
@Service
public class EmpServiceImpl implements EmpService {
   @Autowired
   private EmpMapper empMapper;

   @Override
   public List<Emp> getAll() {
      return empMapper.selectAll();
   }

   @Override
   public Boolean add(Emp emp) {
      int i = empMapper.insertSelective(emp);

      return i>0?true:false;
   }
}
